package com.youchuang.action.user;

import org.apache.log4j.Logger;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.ParentPackage;
import org.apache.struts2.convention.annotation.Result;

import com.opensymphony.xwork2.ActionSupport;
import com.youchuang.action.BaseAction;

/**
 * 登出
 * 
 * @author Winnie
 *
 */
@Namespace(value = "/user")
@ParentPackage("shopping-default")
public class LogoutAction extends BaseAction {
	private Logger logger = Logger.getLogger(LogoutAction.class.getSimpleName());

	@Action(value = "logout", results = {
			@Result(name = ActionSupport.SUCCESS, location = "/WEB-INF/jsp/user/login_form.jsp") })
	public String execute() {
		logger.info("excetion is execute");
		session.clear();
		return ActionSupport.SUCCESS;
	}
}
